Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 2 - Shape Objects / Shape Objects Reference
Functions / Creating and Manipulating Shape Objects


GXGetShapeSize

You can use the GXGetShapeSize function to determine the amount of memory currently occupied by a shape object.

long GXGetShapeSize(gxShape source);
source
A reference to the shape object to determine the current memory size of.
function result
The number of bytes of memory currently occupied by the shape specified in the source parameter.
DESCRIPTION
The GXGetShapeSize function takes the source shape's type, owner count, fill, attributes, and geometry into consideration. It does not include the memory used by the shape's style, ink, transform, or tag objects, but does include the memory used by the references to them.

The function result also includes the size of some shape properties private to QuickDraw GX, but does not include the size of the shape cache or the size of any memory overhead used to represent the shape.

This function returns only the memory size currently used by the shape. For example, when a shape is unloaded to disk it uses less memory, and the result of this function reflects its smaller size.

You can use the GXLoadShape function to load a shape into memory before determining its size.

ERRORS, WARNINGS, AND NOTICES
Errors 
shape_is_nil 
SEE ALSO
To find the size of a shape's cache, use the GXGetShapeCacheSize function, described on page 2-64.

The GXLoadShape function is described in the memory management chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.

For information about the memory size of graphic shapes, see the geometric shapes chapter of Inside Macintosh: QuickDraw GX Graphics. For information about the memory size of typographic shapes, see the typographic shapes chapter of Inside Macintosh: QuickDraw GX Typography.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996